<?php
    header('Content-type:text/json');
    require "../../connection.php";
    $id = $_POST['id'];
    $result = $conn->doSql("select * from goods_adv_map where id = ".$id);
    $res = $conn->doSql("select id,goods_name from goods ");
    array_push($result,array("goodsName"=>$res));
    echo json_encode($result);

?>